package cn.hairui.fastms.core.service;

import cn.hairui.fastms.core.bean.SRoleResc;
import cn.hairui.fastms.core.mapper.SRoleRescMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 角色资源关系表 服务实现类
 * </p>
 *
 * @author lihairui
 * @since 2020-11-29
 */
@Service
public class SRoleRescServiceImpl extends ServiceImpl<SRoleRescMapper, SRoleResc> implements SRoleRescService {

    @Autowired
    private SRoleRescMapper sRoleRescMapper;

/*    @Override
    public List<SRoleResc> selectAllByUserAccountOrderByRoleCdeDesc(List<SUserRole> sUserRoleList) {
        return sRoleRescMapper.selectAllByRoleCdeContainingOrderByRescCdeDesc(sUserRoleList);
    }*/

    @Override
    public List<Map> selectRoleRescByRoleCde(String roleCde, String parentMenuId) {
        return sRoleRescMapper.selectRoleRescByRoleCde(roleCde, parentMenuId);
    }

    @Override
    public SRoleResc selectRoleRescByRoleCdeAndRescCde(String roleCde, String rescCde) {
        return sRoleRescMapper.selectRoleRescByRoleCdeAndRescCde(roleCde, rescCde);
    }
}
